package com.neudeu.controller;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.SessionAttributes;

import com.neudeu.dto.UserLogin;
import com.neudeu.entity.CategoryEntity;
import com.neudeu.entity.UserEntity;
import com.neudeu.page.Page;
import com.neudeu.service.CategoryService;
import com.neudeu.service.UserService;

@Controller
@RequestMapping("cate")
public class CategoryController {
	
	@Autowired
	private CategoryService cateservice;
	
	@GetMapping("list")
	@ResponseBody
	public List<CategoryEntity> list() {
		return cateservice.all();
	} 
	
}
